#include <iostream>
using namespace std;
long factoirial(int n)
{
    if(n == 0)
        return 1;
    else
        return n * factoirial(n-1);
}
int main()
{
    int n;
    cin>>n;
    cout<<factoirial(n);
}